package day20170411.ch01;

public class Person {
	/**
	 * 身份证
	 */
	private String idCard;
	
	/**
	 * 名字
	 */
	private String name;
	
	/**
	 * 年龄
	 */
	private int age;
	
	/**
	 * 性别
	 */
	private char sex;
	
	/**
	 * set/get
	 * @return
	 */
	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public char getSex() {
		return sex;
	}

	public void setSex(char sex) {
		this.sex = sex;
	}
	
	/**
	 * 有参构造方法
	 * @param idCard
	 * @param name
	 * @param age
	 * @param sex
	 */
	public Person(String idCard, String name, int age, char sex) {
		super();
		this.idCard = idCard;
		this.name = name;
		this.age = age;
		this.sex = sex;
	}
	
	/**
	 * 学习方法
	 * @param something
	 */
	public void learn(String something){
		System.out.println(this.name + "去学习" + something);
	}
	
	/**
	 * 工作方法
	 * @param something
	 */
	public void work(String something){
		System.out.println(this.name + "去工作" + something);
	}
	
	/**
	 * 个人信息
	 * @return
	 */
	public String info() {
		return "Person [idCard=" + idCard + ", name=" + name + ", age=" + age + ", sex=" + sex + "]";
	}
}
